<?php
namespace BP\Sys\FrmUI;
require_once("BP/En/Map.php");
class MapAttrBoolen extends EntityMyPK {
	public function getFK_MapData () 
	{
		return $this->GetValStringByKey(MapAttrAttr::$FK_MapData);
	}
	public function setFK_MapData ($value) // [String value]
	{
		$this->SetValByKey(MapAttrAttr::$FK_MapData, $value);
	}
	public function getKeyOfEn () 
	{
		return $this->GetValStringByKey(MapAttrAttr::$KeyOfEn);
	}
	public function setKeyOfEn ($value) // [String value]
	{
		$this->SetValByKey(MapAttrAttr::$KeyOfEn, $value);
	}
	public function getUIBindKey () 
	{
		return $this->GetValStringByKey(MapAttrAttr::$UIBindKey);
	}
	public function setUIBindKey ($value) // [String value]
	{
		$this->SetValByKey(MapAttrAttr::$UIBindKey, $value);
	}
	public function getMyDataType () 
	{
		return $this->GetValIntByKey(MapAttrAttr::$MyDataType);
	}
	public function setMyDataType ($value) // [int value]
	{
		$this->SetValByKey(MapAttrAttr::$MyDataType, $value);
	}
	public function getHisUAC () 
	{
		$uac = new UAC();
		$uac->IsInsert =  FALSE ;
		$uac->IsUpdate =  TRUE ;
		$uac->IsDelete =  TRUE ;
		return $uac;
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Sys_MapAttr", "Boolen字段");
		$map->Java_SetDepositaryOfEntity($Depositary->None);
		$map->Java_SetDepositaryOfMap($Depositary->Application);
		$map->Java_SetEnType($EnType->Sys);
		$map->IndexField = MapAttrAttr::$FK_MapData;
		$map->AddTBStringPK(MapAttrAttr::$MyPK, NULL, "主键",  FALSE ,  FALSE , 0, 200, 20);
		$map->AddTBString(MapAttrAttr::$FK_MapData, NULL, "实体标识",  FALSE ,  FALSE , 1, 100, 20);
		$map->AddTBString(MapAttrAttr::$Name, NULL, "字段中文�?",  TRUE ,  FALSE , 0, 200, 20,  TRUE );
		$map->AddTBString(MapAttrAttr::$KeyOfEn, NULL, "字段�?",  TRUE ,  TRUE , 1, 200, 20);
		$map->AddDDLSysEnum(MapAttrAttr::$MyDataType, 4, "数据类型",  TRUE ,  FALSE );
		$map->AddBoolean(MapAttrAttr::$UIVisible,  TRUE , "是否可见�?",  TRUE ,  TRUE );
		$map->AddTBString(MapAttrAttr::$DefVal, "0", "默认�?(是否选中�?0=�?,1=�?)",  TRUE ,  FALSE , 0, 200, 20);
		$map->AddBoolean(MapAttrAttr::$UIIsEnable,  TRUE , "是否可编辑？",  TRUE ,  TRUE );
		$map->AddTBStringDoc(MapAttrAttr::$Tip, NULL, "�?活提�?",  TRUE ,  FALSE );
		$map->AddDDLSysEnum(MapAttrAttr::$ColSpan, 1, "单元格数�?",  TRUE ,  TRUE , "ColSpanAttrDT", "@0=�?0个单元格@1=�?1个单元格@2=�?2个单元格@3=�?3个单元格@4=�?4个单元格");
		$map->AddDDLSysEnum(MapAttrAttr::$TextColSpan, 1, "文本单元格数�?",  TRUE ,  TRUE , "ColSpanAttrString", "@1=�?1个单元格@2=�?2个单元格@3=�?3个单元格@4=�?4个单元格");
		$map->AddTBInt(MapAttrAttr::$RowSpan, 1, "行数",  TRUE ,  FALSE );
		$map->AddDDLSQL(MapAttrAttr::$GroupID, 0, "显示的分�?", MapAttrString::getSQLOfGroupAttr(),  TRUE );
		$map->AddTBInt(MapAttrAttr::$UIWidth, 0, "宽度(对自由表单有�?)",  TRUE ,  FALSE );
		$map->AddTBInt(MapAttrAttr::$Idx, 0, "顺序�?",  TRUE ,  FALSE );
		$rm = new RefMethod();
		$rm->Title = "事件绑函�?";
		$rm->ClassMethodName = ($this . ".BindFunction()");
		$rm->refMethodType = $RefMethodType->RightFrameOpen;
		$map->AddRefMethod($rm);
		$this->set_enMap($map);
		return $this->get_enMap();
	}
	protected function afterInsertUpdateAction () 
	{
		$mapAttr = MapAttr::constructor__();
		$mapAttr->setMyPK($this->getMyPK());
		$mapAttr->RetrieveFromDBSources();
		$mapAttr->Update();
		CCFormAPI->AfterFrmEditAction($this->getFK_MapData());
		parent->afterInsertUpdateAction();
	}
	protected function afterDelete () 
	{
		if (($this->getFK_MapData()->contains("ND") ==  TRUE ))
		{
			$fk_mapData = ($this->getFK_MapData()->substring(0, ($this->getFK_MapData()->length() - 2)) . "Rpt");
			$sql = (((("DELETE FROM Sys_MapAttr WHERE FK_MapData='" . $fk_mapData) . "' AND KeyOfEn='") . $this->getKeyOfEn()) . "'");
			DBAccess::RunSQL($sql);
		}
		CCFormAPI->AfterFrmEditAction($this->getFK_MapData());
		parent->afterDelete();
	}
	public function BindFunction () 
	{
		return ((("../../Admin/FoolFormDesigner/MapExt/BindFunction.htm?FK_MapData=" . $this->getFK_MapData()) . "&KeyOfEn=") . $this->getKeyOfEn());
	}
}
?>
